Deep learning for precise diagnosis and subtype triage of drug‐resistant tuberculosis on chest computed tomography

Abstract Deep learning, transforming input data into target prediction through intricate network structures, has inspired novel exploration in automated diagnosis based on medical images. The distinct morphological characteristics of chest abnormalities between drug‐resistant tuberculosis (DR‐TB) and drug‐sensitive tuberculosis (DS‐TB) on chest computed tomography (CT) are of potential value in differential diagnosis, which is challenging in the clinic. Hence, based on 1176 chest CT volumes from the equal number of patients with tuberculosis (TB), we presented a Deep learning‐based system for TB drug resistance identification and subtype classification (DeepTB), which could automatically diagnose DR‐TB and classify crucial subtypes, including rifampicin‐resistant tuberculosis, multidrug‐resistant tuberculosis, and extensively drug‐resistant tuberculosis. Moreover, chest lesions were manually annotated to endow the model with robust power to assist radiologists in image interpretation and the Circos revealed the relationship between chest abnormalities and specific types of DR‐TB. Finally, DeepTB achieved an area under the curve (AUC) up to 0.930 for thoracic abnormality detection and 0.943 for DR‐TB diagnosis. Notably, the system demonstrated instructive value in DR‐TB subtype classification with AUCs ranging from 0.880 to 0.928. Meanwhile, class activation maps were generated to express a human‐understandable visual concept. Together, showing a prominent performance, DeepTB would be impactful in clinical decision‐making for DR‐TB.


INTRODUCTION
Tuberculosis (TB), induced by the bacillus Mycobacterium tuberculosis, is one of the leading causes of infectious mortality and results in approximately 10.6 million cases and 1.3 million deaths in 2022. 1 Drug-resistant tuberculosis (DR-TB) serves as a predominant factor hindering the World Health Organization (WHO) End TB strategy realization on account of the more complex regimens with higher risk of adverse effects and worse outcomes. 2ith 410,000 individuals developed multidrug-resistant or rifampicin-resistant tuberculosis (MDR/RR-TB) and 57% of cases untreated, 1 DR-TB management is far from the global target.Moreover, approximately 25% of antimicrobial resistance-related deaths are due to rifampicinresistant tuberculosis (RR-TB). 3Extensively drug-resistant tuberculosis (XDR-TB), the most advanced subtype of DR-TB, 4 with less than half successful treatment and being more prone to long-term sequelae, is of great concern as well. 5,6Consequently, DR-TB remains a substantial threat to public hygiene, and prompt diagnosis and optimal therapeutic strategy-making based on the susceptibility profiles of DR-TB are crucial for TB supervision.Thus far, culture-based phenotypic drug-susceptibility testing (DST) is indicated as the primary reference standard of drug resistance analysis but is technically difficult, requiring strict operation and quality management.More to the point, this procedure is restricted by the slow reproduction of Mycobacterium tuberculosis, resulting in appropriate intervention delays due to the drawbacks of being time consuming for weeks. 7,8Genetic approaches, such as line-probe assays and whole genome sequencing, which decide phenotypic resistance via the genotypes of strains, although reducing turnaround time, are bacterial load-and facility-dependent. 8Furthermore, the association between variations and novel or rare anti-TB agents remains to be analyzed, potentially leading to diagnostic mishaps. 9esides laboratory tests, radiology plays a pivotal role in TB screening and diagnosis owing to its accessibility and efficiency. 102][13] Additionally, cavities and lesion extent are characterized differently among patients with RR-TB, multidrug-resistant tuberculosis (MDR-TB), and XDR-TB, implying the diagnostic potential of chest CT imaging. 146][17][18][19][20] For automated diagnosis of DR-TB, chest X-ray (CXR), a two-dimensional projection consisting of overlapped anatomical structures, was commonly utilized, whereas CT imaging, a three-dimensional (3D) reconstruction presenting higher diagnostic reliability, has been seldom reported. 21Moreover, moderate performance and small-scale datasets hinder the practicality and generality of those models. 22,23herefore, in this study, we proposed a superior semisupervised multitask deep learning model, named Deep learning-based system for TB drug resistance identification and subtype classification (DeepTB), based on chest CT volumes and large-scale dataset-pretrained convolutional neural network (CNN)-ResNet, for simultaneous pulmonary abnormality recognition, diagnosis, and subtype classification of DR-TB accurately, with a further purpose to support optimal clinical decisionmaking.

Demographic characteristics of included patients and dataset composition
The overall workflow was provided in Figure 1. 24And characteristics of the included patients and the selection process were respectively summarized in Table 1 and Figure S1.Following the inclusion criteria, 1751 patients were initially enrolled.After the exclusion process, 1176 patients were confirmed selected, consisting of 390 (33.2%) individuals with DR-TB and 786 (66.8%) patients with drug-sensitive tuberculosis (DS-TB).There were differences between the two cohorts.The DR-TB cohort had a mean age of 43.3 years and a male proportion of 66.2%.Nevertheless, the DS-TB group held a higher average age of 45.3 years and a declined percentage of males of 57%, consistent with previous studies, indicating the risk factors associated with DR-TB of being younger and male sex. 25,26n the subtask of DR-TB subtype classification, three major types, including RR-TB, MDR-TB, XDR-TB, were analyzed.As for the grouping principle, we followed the drug resistance definition recommended by WHO. 27The respective number of patients with RR-TB, MDR-TB, and XDR-TB in this task was 117 (46.4%), 124 (49.2%), and 11 (4.4%).
In terms of DR-TB diagnosis, the CT volumes were randomly split in the ratio of 7:2:1 into training (n = 823), validation (n = 235), and test (n = 118) sets, without overlapping among them.The dataset partitioning strategy in DR-TB subtyping followed the same ratio.

Characteristics of chest abnormalities
For pulmonary abnormality detection, we manually marked 1663 lesion labels, which were then divided at the ratio of 7:2:1 for training (N = 1164), validation (N = 333), and test (N = 166).In the annotation step, we framed predominant chest abnormalities on the CT scans with rectangles along with lesion labels, including nodule, patchy shadow, cavity, consolidation, pleural effusion, bronchiectasis, miliary nodule, mass, ground-glass opacity (GGO), and others.It needs to be emphasized that not all the lesions were marked.Instead, owing to the complexity of TB imaging and the resultant laborious workload, we mainly concentrated on critical abnormalities that meaningfully contributed to the final diagnosis and utilized a semi-supervised learning method to autonomously generate pseudo-labels for the remaining unlabeled data (detailed model development was introduced in the Materials and Methods section).
After the manual labeling and statistics, patchy shadows (25.2%) and cavities (21.5%) were most dominant on CT scans in patients with DR-TB, meanwhile holding a higher incidence of pleural effusion (9.3%) and bronchiectasis (8.6%) than DS-TB.Nevertheless, in the DS-TB cohort, nodules (38.4%) and consolidations (15.9%) were more frequently observed (Table 1).Additionally, the Circos which presented the correlation between types of drug resistance and chest pathologies was depicted in Figure 2.

Model performance in chest abnormality detection
For the model development, in the first step, we investigated whether the model could assist radiologists in ResNet performed best in this task overall, with the highest detection AUCs of 0.893 (95% CI: 0.811, 0.935) for patchy shadow, 0.842 (95% CI: 0.807, 0.866) for cavity, 0.861 (95% CI: 0.847, 0.890) for consolidation, 0.889 (95% CI: 0.858, 0.917) for pleural effusion, 0.873 (95% CI: 0.842, 0.900) for bronchiectasis, 0.930 (95% CI: 0.889, 0.967) for miliary nodule, and 0.895 (95% CI: 0.870, 0.927) for GGO.DenseNet accidentally exceeded ResNet in nodule recognition with an AUC of 0.867 (95% CI: 0.835, 0.871) while ResNet showed a slightly lower AUC of 0.851 (95% CI: 0.817, 0.871).Moreover, GoogLeNet presented the highest AUC of 0.837 (95% CI: 0.814, 0.866) for mass detection (Table 2).One intriguing phenomenon was that almost all models presented the most accurate performance in miliary nodule identification.A likely candidate was the distinctive feature of miliary nodule being uniform in distribution, size, and density, along with the widespread lung field involvement. 28hat is more, model scores derived from ResNet of abnormal lung regions were obviously higher than those of healthy areas; Figure S2 presented the differentiation, indicating the discriminative capability of the model in radiological interpretation.Confusion matrices in this task were provided in Figure S3.
In addition, ResNet achieved an accuracy of 0.915 (95% CI: 0.904, 0.925) and a specificity of 0.938 (95% CI: 0.928, 0.949), appropriately balancing false negatives and false positives combined with a recall exceeding 0.85.Although the other three networks attained specificity over 0.9, corresponding recall values were less than ResNet, suggesting worse sensitivity (Table 3).The confusion matrices were displayed in Figure S4.
Thus, after the above-mentioned synthesized comparison, the ResNet-based model was chosen as the optimal network and was named DeepTB.The model scores of the system in predicting patients with DR-TB, RR-TB, MDR-TB, and XDR-TB were significantly higher than negative ones, showing a decent recognition capacity (Figures 5A  and B).

Model visualization via class activation maps
In realistic clinical settings, due to the opaque black-box effect of CNNs, physicians may be suspicious of the model output. 29Thus, the algorithm generated class activation maps (CAMs) to precisely locate the anomalous foci in the lung region, translating the model output into a humanunderstandable visual concept.Characteristics, such as nodule, patchy shadow, cavity, and consolidation, which may contribute to the final prediction, were strongly activated (Figures 5C-F).Thus, CAMs provided a robust and explainable result by visualizing of the rationale behind the generation of the model, through which the human experts could comprehend how the system achieved the final verdict.

DISCUSSION
In this investigation, actuated by the desire for precise identification of DR-TB to assist in achieving the vision of eliminating TB worldwide, we developed a clinically applicable deep learning system, DeepTB, to efficiently analyze chest abnormality, DR-TB suffering, and the specific kind of subtype by decoding CT volumes via the pretrained CNN backbone, showing remarkable performance improvement.Therapeutic regimens of DR-TB are different from DS-TB and vary widely upon particular subtypes. 30Emerging The highest AUC value, along with corresponding accuracy, recall, and specificity when they were over 0.85 of each chest abnormality were bolded.Abbreviations: AUC, area under the curve; CI, confidence interval; GGO, ground-glass opacity.
evidence has revealed higher DR-TB morbidity in previously treated patients, implying that optimal regimens in the beginning may arrest the disease progression to an expanded drug resistance spectrum. 31,32The curative effect of certain drugs has been authenticated and regimens including specific ones, such as bedaquiline, linezolid, clofazimine, later-generation fluoroquinolones, and carbapenems, may improve the therapeutic efficiency of DR-TB, which could be a reference to clinical decisions. 33herefore, precise diagnosis of DR-TB is crucial for proper treatment initiation, with further objectives to ameliorate clinical outcomes and maintain public health welfare. 34adiology, a comparatively more convenient and timesaving strategy for disease assessment, demonstrates enormous potential in DR-TB evaluation. 35A logistic regression analysis has been carried out based on the differential representations on chest CT scans between DR-TB and DS-TB.Various characteristics, including wider lung involvement range, emphysema, bronchial dissemination, multiple cavities, exudative lesions, and so on, may participate in DR-TB prediction. 13Additionally, in specific DR-TB subtypes, features of lesion range and cavities manifest discriminatively as well.In RR-TB, small cavities with diameters less than 1.5 cm are commonly seen, and the patients with MDR-TB often present more than three cavities.XDR-TB, the most serious one, can demonstrate lesions that spread to more than three lung fields even TB-destroyed lung. 12Thus, CT imaging deserves extended exploration in diagnostic usage.
][17][18][19][20] And efficiency of software for automated TB diagnosis has been validated, offering novel insights for TB management. 50,51Moreover, we constructed a high-profile deep learning pipeline to classify several pulmonary diseases, including TB, achieving a diagnostic performance approximate to senior radiologists. 46n terms of DR-TB, the existing situation is not so desirable.AI systems that achieved preferable outcomes mostly were trained by gene sequences of Mycobacterium tuberculosis isolates, [52][53][54][55] not applicable to resourcelimited settings on account of the costly sequencing facility requirement.As for medical image-based studies, alarming issues, including limited datasets, moderate performance, and rough subtype classification, surround  The highest AUC value, along with corresponding accuracy, recall, and specificity when they were over 0.  the implementation of these AI models into real-world medical utility and precise medicine. 22,23,48,56In addition, most of these models were developed by CXRs, rather than CT volumes, which demonstrate more differential and subtle features of intricate tissue structures and are of more significant value in diagnosis. 57In a study that utilized CT images to identify DR-TB, the dataset contained over 200 patients and the DR-TB cohort solely consisted of MDR-TB, without the subtype mentioned. 22o a certain extent, the strategy applied in our study surmounts the abovementioned conundrums.We have made progress for DR-TB diagnosis and subtype triage before. 58And in this study, based on a dataset of CT volumes from more than 1000 patients, we further involved four deep learning architectures and compared their performance via various parameters.For model performance improvement, three strategies were adopted.First, we conducted pretraining via transfer learning, 59 leveraging the knowledge learned from the large-scale dataset, Kinetics, and obtained an accelerated convergence speed.Moreover, as conventional large dataset-based supervised learning mostly depends on high-quality labels hand-assigned by researchers, demanding a considerable amount of well-trained experts and work, 60 we utilized the semi-supervised learning approach, 61 through which the model performance could be enhanced based on unlabeled information.In contrast to the traditional pseudo-label generation methods, we ensured reliability by calculating the informative of samples and partitioning the data.Combined with K-nearest neighbor-equipped CNNs, confirmation bias issues could be alleviated, outperforming threshold-based conventional pseudo-labeling.Finally, we integrated auxiliary information through the multitask learning strategy to assist primary task training. 62Through optimization of multiple loss functions, the network could extract a shared feature set relevant to both tasks to improve the performance of predominant task.
ResNet, of which the core mechanism is the residual connection, assisting in addressing the issue of gradient vanishing and enabling deeper network training without a substantial increase in parameters, was selected as the optimal backbone for DeepTB construction.And this advantage became more apparent in the 3D data we were dealing with.Additionally, global average pooling of ResNet could reduce overfitting and performed well in transfer learning and fine-tuning in our tasks, meanwhile exhibiting robust performance in handling noisy or incomplete data.
Therefore, DeepTB presents great potential to be used as the frontline tool for streamlining DR-TB care, especially after being integrated into clinical workflow.To achieve this assumption, embedding the model into a software or online webserver, which is smoothly linked to the procedures of CT examination and image generation, is a practical strategy.After the CT volumes were input, the algorithm was capable of precisely localizing the chest lesions and recognizing corresponding anomalies.With the assistance of DeepTB, radiologists can utilize the model output as a reference for image interpretation with higher efficiency in a routine process.If there is any disagreement between human specialists and the machine, the radiologists may decide whether or not to change the findings after reassessment, through which the reading mistakes could be reduced.Then, the system automatically generated an accurate DR-TB prediction and specific subtypes, facilitating individual regimen planning upon different drug resistance profiles.In addition, we utilized CAMs to visualize the inner working of DeepTB via the depiction of abnormal chest areas, explaining the mystique of how the results were derived from an image-based deep learning system.And the Circos which demonstrated the correlation between chest abnormalities and drug resistance state suggested the diagnostic significance of those radiological findings, as well as the underlying effect on lung damage of different Mycobacterium tuberculosis resistant mutants.
There are several limitations in our study.First, the training data were extracted from a single hospital, and included participants containing Asia people only, leading to a potential bias and restricting the generalization of the model in unrelated population.Enrolling individuals from multicenter organizations with various geography, demographics, and disease spectrum may help to ensure the accuracy of the results and model popularization.Moreover, the dataset remains to be expanded for model optimization in the era of big data.In the meantime, to improve the utility of DeepTB, prospective validation and clinical trials are essential to solve the shortage of the retrospective study.Then, as the DR-TB proportion in this study was higher than in reality, the model performance needs to be evaluated in a TB cohort with a lower DR-TB prevalence approximate to the real world.In addition, we utilized CT volumes for the model development only, while analyzing multidimensional medical data is required in clinical reality.Besides radiology, integrating medical records, laboratory tests, pathology, and so on can provide a more precise decision.Multimodal deep learning strategy becomes an emerging method in healthcare to realize this vision.Our team has built a unified model for evaluating respiratory diseases by embedding visual and textual information, outperforming the image-only algorithm and shedding light on the future strategy applied in DR-TB. 42Finally, it should be stressed that radiology and AI just serve as auxiliary diagnostic tools of DR-TB, while molecular drug resistance testing still is the gold standard for definite diagnosis.

CONCLUSIONS
To sum up, DeepTB demonstrates tremendous potential in DR-TB management on the basis of deep learning strategy.The algorithm precisely identifies the typical TB chest anomalies on CT scans, showing a latent capacity to reduce diagnostic workflow time costs and the need for diagnostic expertise in radiological explanation, the critical process of disease evaluation.Subsequently, the output of DR-TB diagnosis and subtypes can assist clinicians in precise medication initiation and avoid improper drug usage.Showing prominent accuracy, DeepTB is helpful in improving the treatment enrollment and the life quality of patients with DR-TB, especially in settings with limited resources and a high TB incidence.Going forward, automated systems for treatment assessment and clinical outcome prediction of DR-TB are warranted.Additionally, it is worthwhile to reflect on how to convert AI prototypes into practical clinic systems.

Study participants
We randomly enrolled 1751 patients with pulmonary TB who visited West China Hospital of Sichuan University between January 2008 and November 2023 retrospectively.This study was approved by the institutional review boards of West China Hospital of Sichuan University, with a waiver of the requirement for informed consent from each patient.The inclusion criteria were as follows: (1) patients who were confirmed with TB through pathogenic detection (microscopy or culture of Mycobacterium tuberculosis) or clinical confirmation through a synthesized analysis of radiology, symptoms, and laboratory tests; (2) the results of DST, GeneXpert MTB/RIF, or gene testing for drug resistance detection for DR-TB and above results or follow up information for DS-TB were available; (3) patients who were 18−90 years old.The exclusion criteria were: (1) CT images within 3 months of diagnosis were unavailable; (2) incomplete CT images; (3) accompanying other severe lung diseases that were confusing on CT volumes, such as severe pneumonia, pulmonary abscess, lung cancer, pulmonary fibrosis, sarcoidosis, and so on.Ultimately, 1176 patients were eligible for this study (Table 1 and Figure S1).

Image preprocessing
The selected CT images were input into the annotation system for processing.We conducted data transfer before manual annotation.In this procedure, we applied filtering to all CT data for each patient based on various fields, including CT series number, window width, window center, and acquisition date, which were obtained from the digital imaging and communications in medicine (DICOM) data.Specifically, we excluded the image data that did not match the CT sequence numbers and diagnosis time interval.And then we identified lung window CT images through window width and window center criteria.Next, we imported the filtered data into our database.There were various irrelevant regions while the original CT volumes were utilized as the raw input, posing a significant challenge to the model training.To allow the model to focus more on TB-related areas, we cropped out the lesions and selected the largest plane for each lesion as the central plane.As CT volumes were presented in a 3D form, we calculated the depth of each lesion as half the sum of its length and width.This calculation was performed to crop the lesion into a 3D cube shape and then we employed a resampling algorithm to adjust the pixel spacing to 1 × 1 × 1.In detail, we retrieved the pixel spacing information from the DICOM data.Then, we obtained the scaling factor to adjust the original pixel spacing to the target spacing by dividing the target spacing by the original spacing.Subsequently, we employed the trilinear interpolation algorithm to interpolate and calculate new pixel values in the original image.For each point in the target image to be resampled, the position of that point in the new image was calculated based on the scaling factor.For the target position to be interpolated, the weights of its nearest eight pixels in the original image were computed.We assigned the reciprocal of the distance between the interpolation point and the original image pixel as the weight for that pixel, with closer pixels having higher weights.Using the calculated weights, we performed interpolation for the target position.This process would be repeated for each position in the target image until the entire image was interpolated, thus achieving the adjustment of pixel spacing.
Then, we resized the cropped lesions with a consistent size in a width/height of 128 and a depth of 64 and input them into the algorithm for model training.These resized lesions were referred to as lesion-based patches and were used to train the networks for chest abnormality identification and DR-TB diagnosis.To address the imbalance in sample categories, all DR-TB patches were employed while DS-TB patches were randomly selected to ensure data balance between the two categories.
As the number of TB-associated lesions varied among the study participants, we recorded the number of all lesions in each case.Then we calculated the partition length which was the value of the predefined depth divided by the amount of the lesions.We centered on half the depth of the lesion input and extracted slices extending half of the partition length both upwards and downwards along the depth axis to obtain the partitioned lesions.All partitioned lesions of each case were then stacked to obtain the predefined input depth size.These patches were utilized in the DR-TB subtype classification.Data augmentation strategies, such as random rotation and flipping, were utilized to reduce the risk of overfitting. 63

Model development
We proposed four patch-based deep learning models to distinguish DR-TB from DS-TB automatically.The overall workflow of the model construction was depicted in Figure 1.
In this study, we employed a semi-supervised learning approach for pseudo-label generation, utilizing the feature information of unlabeled data to optimize the model performance.Simultaneously, considering the issue of data imbalance in our tasks, we adopted a sample informativeness-based approach. 64By treating highly informative labeled samples as anchor samples, we calculate the informativeness of unlabeled samples by measuring their similarity to these anchor samples.We emphasized unlabeled samples with higher informativeness, which were positioned as far as possible from the distribution of labeled samples, making them likely to belong to the minority.This strategy addressed the issue of class imbalance during training.Additionally, the method combining model predictions with K-nearest neighbor predictions guided by sample informativeness effectively alleviated confirmation bias issues. 65o extract spatial information from CT images, we constructed 3D patch-based automated systems based on four CNNs, 66 including GoogLeNet, 67 DenseNet, 68 VGG16, 69 and ResNet, 70 to identify the different characteristics of chest lesions from patients with DS-TB and DR-TB.All four models were pretrained on a large-scale image dataset Kinetic. 70,71GoogLeNet replaced traditional convolutions with Inception modules and DenseNet utilized dense connections within the network to enhance model performance.VGG16 and ResNet respectively employed depthwise small convolutional kernels and residual connections to improve efficiency.The penalty cross-entropy (PCE) loss [(  ,   )] was used to distinguish false negatives from false positives by penalizing each error differently, 72 as shown in the following equation: In this equation,   and   referred to the true label and the predicted label of lesions, respectively.The penalty factor   was calculated as follows: where C represented the given penalty value which was set to 2 in our experiment.Notably, we adapted chest abnormalities as auxiliary labels in DR-TB diagnosis and subtype classification training via multitask learning.Ten neurons were used to output the morphological features of pulmonary lesions and one neuron was employed to generate the probability of DR-TB.The multitask loss function was the weighted combination of the PCE loss and the binary cross-entropy (BCE) loss with sigmoid.The PCE loss was used for the DR-TB identification and triage, and the BCE loss with sigmoid was used for identifying morphological characteristics.The loss function of DR-TB diagnosis and subtype classification was  Dr , and the loss function of chest abnormality classification was  Morph .The multitask loss function ( multi ) was defined as follows: multi =  Dr +  Morph where  and  denoted the weight factor of the classification tasks.
In subtasks, including chest abnormality detection, DR-TB diagnosis, and subtype triage, each experiment was conducted five times, and the results were calculated by averaging the results of five experiments.All the experiments were conducted on an Ubuntu 18.04 server with one Tesla V100 (32G) GPU using CUDA 10.1.The model was coded and built using Python 3.6 and PyTorch 1.0.0 and the model was trained with 120 epochs with the stochastic gradient descent (SGD) algorithm employed as the optimizer.The learning rate (LR) was set to 0.006 and divided by 10 after every 50 epochs.

Statistical analysis
AUC, accuracy, specificity, recall (sensitivity), precision, F1-score, and confusion matrix were utilized to evaluate the model performance by Python 3.6 open resource package.AUC can synthetically assess the model's ability in object prediction, indicating better model performance with a value closer to 1. Specificity refers to the ratio of correctly predicted negative samples. 73Recall (sensitivity) is the proportion of correctly predicted positive samples and precision presents the ratio of samples predicted as positive by the model that are true positive, while the F1-score is the harmonic mean of precision and recall. 74ese metrics provided a comprehensive evaluation of the proposed models.The 95% CIs were calculated by the Delong method.

A C K N O W L E D G M E N T S
We appreciate the 3D slicer for supporting for element design in Figure 1.The study was supported by the National Natural Science Foundation of China (82100119, 62106163), the Science and Technology Project of Sichuan (2023NSFSC1889, 2023YFG0283), the Science and Technology Project of Chengdu (2023-YF09-00007-SN), the Sichuan University from "0" to "1" Innovation Project (2023SCUH0051), West China Hospital of Sichuan University (ZYGD23027), and the CAAI-Huawei MindSpore Open Fund.

C O N F L I C T O F I N T E R E S T S TAT E M E N T
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

D ATA AVA I L A B I L I T Y S TAT E M E N T
All the data are available from corresponding authors upon reasonable request.

E T H I C S S TAT E M E N T
Institutional Review Board approval was obtained with the approval number of 2023 (2286).

F I G U R E 1
Flow chart of the deep learning model construction.CT, computed tomography; DR-TB, drug-resistant tuberculosis; DS-TB, drug-sensitive tuberculosis; MDR-TB, multidrug-resistant tuberculosis; RR-TB, rifampicin-resistant tuberculosis; XDR-TB, extensively drug-resistant tuberculosis.TA B L E 1 Summary of the included patients and labeled chest abnormalities.

C o n s o l i d a t i 2
Circos of the correlation between chest abnormalities and types of tuberculosis drug resistance.Outer circle demonstrates the total proportion of the correlation and inner circle presents the relationship.The wider strip corresponds to stronger correlation.DR-TB, drug-resistant tuberculosis; DS-TB, drug-sensitive tuberculosis; GGO, ground-glass opacity; MDR-TB, multidrug-resistant tuberculosis; RR-TB, rifampicin-resistant tuberculosis; XDR-TB, extensively drug-resistant tuberculosis.

F I G U R E 4
Recall, precision, F1-score, and receiver operating characteristic (ROC) curves of four models in drug-resistant tuberculosis (DR-TB) diagnosis (A and B) and subtype triage of rifampicin-resistant tuberculosis (RR-TB) (C and D), multidrug-resistant tuberculosis (MDR-TB) (E and F), and extensively drug-resistant tuberculosis (XDR-TB) (G and H) in the test set.
Chengdi Wang and Weimin Li conceived the concept for the study.Shufan Liang and Jun Shao selected the participants and annotated the imaging data.Xiuyuan Xu, Zhe Yang, Qiuyu Du, Lingyu Zhou, and Jixiang Guo contributed to the algorithm development.Shufan Liang, Xiuyuan Xu, and Zhe Yang drafted the original version of the manuscript and designed the figures and tables.Chengdi Wang and Binwu Ying revised the final submission.All authors have read and approved the final manuscript.
Performance of four models in chest abnormality detection of tuberculosis in the test set.
TA B L E 2 Performance of four models in drug-resistant diagnosis and subtype classification in the test set.
TA B L E 3